Focus and illumination analysis algorithm for imaging device

ABSTRACT

A hand-held imager which is capable of reading both linear and two dimensional symbologies, which can perform focusing and illuminating steps quickly and accurately so as to eliminate variation in the position of the imager relative to the code becoming a negative factor. The imager includes an imaging system having a focusing system, an illumination system, and a two-dimensional photodetector which forms an image of the coded symbology. After achieving targeting of the coded symbology, the scanning system adjusts the focus and illumination between multiple different focuses, and utilizes a portion of the two-dimensional photodetector to determine the optimum focus and illumination. Upon the determination of optimum focus and illumination, and an image is created using the entire two-dimensional photodetector. Predefined multiple sets of illuminating parameters intensity, exposure and gain can be used to determine the proper focus and illumination.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation in part of U.S. patent applicationSer. No. 09/151,764 filed on Sep. 11, 1998.

This application claims the priority of U.S. Provisional Patentapplication Serial No. 60/209,591 filed on Jun. 6, 2000. Thisapplication is also related to copending U.S. Patent Application SerialNo. (Symbology Imager System) and United States Application No. (Barcode Illumination system) the entire disclosures of which areincorporated herein by reference. Further, International ApplicationSerial No. WO 97/42756 filed on May 6, 1996, for a SmartProgressive-Scan Charge Coupled Device Camera, and which was filed byCIMatrix, one of the co-applicant's of the present application is alsoincorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an imager for reading opticalsymbologies such as traditional bar codes and 2D symbologies. Moreparticularly, the present invention relates to a hand-held optical codeimager which quickly and easily adjusts illumination and focus and hasan preferred operating range of approximately 1.5 to 16 inches, however,the imager may have an operating range with both lower and higherlimits, and still fall within the intended scope of the presentapplication.

2. Description of the Prior Art

The use of bar codes has proliferated to the point where they are usedin almost every industry to provide machine readable information aboutan item or product and to help track such items. Numerous differentsymbologies have been developed, such as one dimensional linear codesand 2D codes, such as Data Matrix. Typical linear codes comprise aseries of parallel lines of varying thickness and spacing which arearranged in a linear configuration to represent a digital codecontaining information relating to the object. The use of bar codes hasexpanded due to the fact that the imaging and tracking processeliminates human error and can be performed quickly.

The amount of information a bar code can contain is dependent upon thesize of the markings employed in the bar code, which determines thedensity of the code. Linear bar codes such as UPC codes, are onlyrecorded in one dimension. On the other hand, 2D symbologies are encodedin two dimensions to contain greater information density.

In a typical reading process, a spot of light from a laser is projectedand swept across the code, and the reflected light is sensed by aphotosensitive element. In conventional imagers, lasers are used as thesource illumination. Scanners may be either installed in a fixedlocation or portable hand-held units.

Hand-held scanners must be designed to operate in situations where thenumber of varying factors is greater than for fixed scanners. Forinstance, the distance between the scanner and the bar code, the amountof illumination, the focusing of the scanner, the orientation of thescanner relative to the bar code, and the angle of the scanner relativeto the bar code are all factors which must be considered for the scannerto operate correctly. For instance, U.S. Pat. No. 5,296,690 to Chandleret al. discloses a system for locating and determining the orientationof bar codes in a two-dimensional image. The Chandler et al. patent isprimarily concerned with making sure that the scan of the bar code isperformed correctly with regard to the orientation of the scanner andthe bar code.

Some hand-held scanning devices have a wand-like configuration where thedevice is intended to make contact with the code as it is swept acrossthe code. Such a wand eliminates the variation in the distance betweenthe scanner and the code and therefore requires no focusing.

Two-dimensional arrays such as CCD arrays have been used to create theimage of the bar code as it is scanned, but traditionally a laser and asingle photodiode are used for scanning a linear bar code. A CCD havingdimensions of 640 by 480 pixels provides sufficient resolution for usewith VGA monitors, and is widely accepted. The video image is sensed inthe CCD, which generates an analog signal representing the variation inintensity of the image, and an analog to digital converter puts theimage signal into digital form for subsequent decoding. Two dimensionalsensors are used with spatially oriented 2D codes.

For a non-contact hand-held scanner, it is necessary to be able to readthe bar code over a reasonable distance, to provide sufficientillumination, to focus the scanner onto the bar code and perform theentire operation in a reasonable amount of time. While it may bepossible to create an imager which can perform all of the desiredfunctions, if the imager does not operate in a manner the user findscomfortable and sufficient, then the imager will not be accepted by endusers and will not be commercially viable. For example, if the imagercannot perform the focusing quickly enough, then variations in theposition of the scanner, due to the inability of the user to hold theimager steady, will create problems which cannot be easily overcome.

By way of example, if a scanner takes too long to perform a focusingfunction from the moment the user depresses a trigger, then the positionof the scanner relative to the bar code may vary during the focusingoperation thereby requiring yet another focusing operation. Similarly,such movement in the position of the scanner relative to the bar codewill change the parameters for achieving the desired illumination.

Scanners which have been designed to read linear, or one dimensional,codes are, for the most part, incapable of scanning 2D symbologies.Linear and 2D symbologies may be provided on items by attaching a labelto the item, putting the item in a container having a preprinted code,or by directly marking the product, such as by etching. Mostconventional scanners may find it difficult to read symbologies whichhave been etched directly onto a product.

SUMMARY OF THE INVENTION

These and other deficiencies of the prior art are addressed by thepresent invention which is directed to a hand-held imager which iscapable of reading both linear one dimensional codes and two dimensionalsymbologies, which can perform illuminating and focusing steps quicklyand accurately so as to eliminate variation in the position of theimager relative to the code, and which can operate in an environmentwhere the imager is preferably positioned anywhere from substantially1.5 inches to 16 inches from the targeted code.

The hand-held imager of the present invention can performomnidirectional coded symbology reading for both linear andtwo-dimensional symbologies over relatively long working distances. Theimager includes an imaging system having a focusing system, anillumination system, and a two-dimensional photodetector which forms animage of the bar code. After achieving targeting of the coded symbology,the reader of the present invention adjusts illumination and then thefocus between multiple different focuses, and utilizes a portion of thetwo-dimensional photodetector to determine the optimum focus. Upon thedetermination of optimum focus, the focusing system is configured at theoptimum focusing configuration established in the initial focusing step,and an image is created using the entire two-dimensional photodetector.

A targeting system visually assists the user to position the reader sothat the coded symbology, being targeted, is within the field of view ofthe reader. The reader has two types of illumination, one forsymbologies which are close to the reader, and a second type ofillumination for symbologies which are farther from the reader. Thetwo-dimensional photodetector may be employed to determine the optimumillumination.

The proper illumination and focus are produced by utilizing aphotometric analysis by developing entropy scores for each illuminatingcondition associated with the optical plates. The quality or nature ofthe transitions (peak-to-peak) are taken into account by the analysis toproduce the entropy scores. Focus analysis is performed by developingentropy scores for dark field and bright field zones with theilluminating condition obtained from the previous photometric analysis.A focused image has a sharp contrast between light and dark areas. Theimage with the highest population density at high frequency indicatesthe best focus.

Unfortunately, while typical one-dimensional bar codes and certaintwo-dimensional symbologies can take advantage of current photometricand focus analysis techniques, direct parts marking (DMP) in whichgenerally a two-dimensional symbology is directed attached to or etchedinto a machine part offers a distinct challenge to produce the correctfocus and illumination for a particular scanned code. This is due to thefact that in DMP applications, the marked surfaces (from low reflectionblack to highly reflected shiny surfaces) and various marking techniquesare quite diverse. This would create a situation in which current focusand photometric techniques can not possibly cover the majority of caseswithout manually changing some of the illuminating parameters, such asintensity, exposure and gain.

The illuminating parameters of intensity, exposure and gain could bemodified among themselves to obtain similar pictures. For example, ifthe intensity is fixed, an image taken with a long exposure and low gainwill be similar to an image taken with a short exposure and a high gain.Unfortunately, when using a hand-held scanner, it is important tocomplete the scan very quickly. Therefore, the proper focus likewise andillumination values must be determined very quickly. Consequently, itwould be quite impractical, if not impossible to provide a rather longexposure to compensate for a low gain, due to the speed of opticalplates rotation used to calculate the correct focus.

It is an object of the present invention to provide a hand-held readingdevice capable of reading both linear and 2D coded symbology.

Another object of the present invention is to provide a hand-held readerwhich can perform an imaging operation in a range between 1.5 inches and16 inches to the coded symbology for typical hand-held use, but may haveboth higher and lower distance limits.

Yet another object of the present invention is to provide a hand-heldreader capable of reading direct product markings in addition to codedsymbology printed on labels.

Still another object of the present invention is to provide a hand-heldreader which utilizes a two dimensional sensor to facilitate focusingand illumination adjustment.

Yet another object of the present invention is to provide a hand-heldreader which utilizes a two dimensional sensor to facilitate focusingand illumination adjustment, where only a small portion of informationreceived by the two dimensional sensor is used, to thereby speedprocessing.

Another object of the present invention is to provide a hand-held readermade from commonly available “off-the-shelf” components.

Still another object of the present invention is to provide a method ofsimultaneously focusing and providing the proper illumination for atwo-dimensional coded symbology when the two-dimensional code is appliedto a part, regardless of the composition of the part as well as thetwo-dimensional code.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing and other attributes and objects of the present inventionwill be described with respect to the following drawings in which:

FIG. 1 is a perspective view of the reader according to the presentinvention;

FIG. 2 is a plan view of a typical linear type coded symbology;

FIG. 3 is a plan view of a Data Matrix symbology;

FIG. 4 is a cross-sectional view of the reader shown in FIG. 1 accordingto the present invention;

FIG. 5a is a perspective view of a first embodiment of a focusing diskwhich may be employed in the focusing system of the present invention;

FIGS. 5b and 5 c are planar and cross-sectional views, respectively, ofa second embodiment of a focusing disk which may be employed in thefocusing system of the present invention;

FIGS. 6a-6 k are represent eleven images p1-p11, where images p1-p6,shown in FIGS. 6a-6 f, are used in the photonics or photometricanalysis, and images p6-p11, shown in FIGS. 6f-6 k, are used in thefocus analysis;

FIG. 7 shows a pixel plot of line 235 of a CCD for the values between128 and 508, in the horizontal location, for images p1, p6, and p11,shown in FIGS. 6a, 6 f and 6 k;

FIG. 7a is a graph showing local minima, local maxima, and inflectionpoints.

FIGS. 8a-8 k show Table A, containing data from which the pixel plots ofFIG. 7 are derived;

FIG. 9 is an edge histogram for images p1-p6, shown in FIGS. 6a-6 f;

FIGS. 10a-10 g show Table B which contains the population for eachpeak-to-peak value of each image p1-p6, and illustrated in FIG. 9;

FIG. 11 is a table showing the entropy score, maximum pixel value andminimum pixel value for each image p1-p6;

FIGS. 12a and 12 b are frequency histograms for images p6-p11, shown inFIGS. 6f-6 k, with FIG. 12b being an enlargement of a portion of FIG.12a;

FIGS. 13a-13 g show Table C which contains the delta peak value of eachimage p6-p11;

FIG. 14 is a chart showing the entropy score, maximum pixel value andminimum pixel value for each image p6-p11;

FIG. 15 is a block diagram of the imager according to the presentinvention.

FIG. 16 is a graph of the illuminating parameters with a high gain on adata reflected surface;

FIG. 17 is a graph of the illuminating parameters with a middle gain ona dark reflected surface;

FIG. 18 is a graph of the illuminating parameters with a low gain on adark reflected surface;

FIG. 19 is a graph of the illuminating parameters with a high gain on ashiny reflected surface;

FIG. 20 is a graph of the illuminating parameters with a middle gain ona shiny reflected surface; and

FIG. 21 is a graph of the illuminating parameter with a low gain on ashiny reflected surface.

DETAILED DESCRIPTION OF THE INVENTION

The hand-held reader 10 shown in FIG. 1 is capable of reading codedsymbologies omnidirectionally, and producing decoded data. The scanningdevice 10 is self-sufficient and does not require an external powersource, except for host power provided through an interface cable 14.The scanner 10 can read both linear bar codes 40, as shown in FIG. 2,and matrix or 2D coded symbologies 54 as shown in FIG. 3.

The linear or 2D coded symbologies are standard symbologies well knownin the art, and the decoding of them is similarly well known. However,unlike conventional scanners, the reader 10 of the present invention canread both types of symbologies, can operate over a wide range ofdistances, 1.5 to 16 inches, and is held-held. To achieve these results,the reader 10, upon activation by the user, must be able to target thecoded symbology, determine the optimum illumination, determine theoptimum focus, and make an image of the targeted coded symbology in anextremely short period of time in order to eliminate possible degradingvariations.

For example as the user holds the reader 10 relative to a linear barcode 40 or a 2D coded symbology 54, the reader can move relative to thecode thereby changing the focus, illumination and angle of the scannerrelative to the code. By performing the entire image capture function asquickly as possible, from the moment targeting is achieved, suchvariables are minimized. How such rapid image focusing, illumination andcapture are performed will be described in detail below.

The reader 10 includes an ergonomic housing 12 designed to fitcomfortably in a user's hand. The reader 10 decodes the data, andforwards the decoded data to a computing device platform, such as a PDT,PLC or PC, which performs information gathering as one of its functions.A switch or trigger 15 protrudes through the top of the housing 12 foractivation by the user's finger. Lights 18 and 20 are provided on thetop of the housing 12 and indicate the active status and successfulimaging of the coded symbology, respectively. Audible signals may alsobe provided.

The hand-held imager 10 utilizes an aiming device to locate the targetsymbologies in the field of view (FOV). The method of targeting isdesigned to minimize power consumption. A programmable two-phase triggeris used to acquire the target symbology.

A window 22 having a clear aperture section 24 is provided on the frontof the housing 12. A targeting line 32 is produced by a light source inthe hand-held imager 10 and is projected onto the targeted codedsymbology to ensure that the coded symbology 40 or 54 is within thefield of view of the imager 10. The targeting line 32 is preferably acolor, such as red, which is discernable from the ambient light sources.

In operation, the user presses the trigger 15 to a first positionthereby causing the projection of the targeting line 32 onto the codedsymbology. The targeting line 32 is then used to position the imager 10and the coded symbology relative to one another. The imager 10 thenadjusts the illuminating light if necessary, and determines the correctfocus. The light 18 is illuminated to indicate to the user that imagingis underway. Upon completion of the imaging process the light 20 turnson to provide the user with an indication of successful scanning.

Referring to FIGS. 2 and 3, a linear code 40 and Data Matrix code 54,respectively, are shown. Typical 2D or Data Matrix symbologies aresmaller than linear codes and may be etched directed onto the product.The information is typically encoded in feature sizes of 5, 7.5, or 10mils. As a result, the imager 10 needs to be much closer when reading 2Dsymbologies 54 than for linear codes 40.

The imager 10 is shown in cross-section in FIG. 4, where the opticalsystem 80 is illustrated as including objective taking lens 92 andfocusing disk 94. The disk is driven rotational at 600 RPM about axis 91by the motor 96. The rotational axis 91 is offset from the optical axisO_(A) of the imaging system 80. A dark field illuminator 82 havingmultiple light emitting elements 98, such as LEDs, which illuminaterearwardly onto a non-transparent wall, which then provides diffuselight to the window 22. A bright field illuminator 84 is provided withmultiple light emitting elements 100 for radiating forward directlythrough the window 22. Dark field illumination is provided for directproduct marking (low contrast), while bright field illumination is usedprimarily for high contrast label marks.

Built-in bright field and dark field illumination are provided toachieve proper contrast for reading the symbologies on direct productmarked parts at close-in distances. Only bright field illumination isused at greater working distances. The details of the illuminationsystem are set forth in co-pending commonly owned patent applicationSer. No. 09/151,765 filed on Sep. 11, 1998.

A key aspect of the present invention is the CCD detector 93, positionedalong the optical axis O_(A). The CCD detector 93 is rectangular and hasa VGA pixel density. In the preferred embodiment, the CCD detector 93 isan interline 659×494 progressive scan, monochromatic CCD, which may bemanufactured by Panasonic Corporation, model #MN37761AE, or a 659×494pixel CCD manufactured by Sony Corporation, model #ICX084AL. Both of theforegoing CCD's provide 640×480 resolution commonly used in VGAmonitors. While the preferred embodiment illustrated herein utilizes aCCD, other array detectors such as CMOS, or other sensors may be used.Furthermore, the CCD need not be limited to 640 by 480 and may haveother sizes.

The hand-held imager 10 can decode multiple symbologies on anybackground, including etched metal and printed ink jet. The paramountreading capability for use on surfaces that are direct product marked isthe Data Matrix symbology.

A first embodiment of the focusing disk 94, shown in cross-section inFIG. 4, is shown in greater detail in FIG. 5a. The disk 94 has a seriesof different thickness optical positions 132. The thickness of theoptical positions 132 is varied to focus the objective lens 92 onto theCCD detector 93 during image capture. The illustrated embodiment showstwelve optical positions 132 which thereby provide twelve potentialfocus ranges. A positional encoding strip 134 is provided on the disk 94so that the position of the disk can be tracked.

Referring to FIGS. 5b and 5 c, planar and cross-sectional views of asecond embodiment of the focusing disk 94 is shown. The secondembodiment has eight optical positions 132 and further includes an outercircumferential wall 136 which provides additional structural support.

The CCD detector 93 is utilized to determine which optical plate 132,and therefore which focusing zone, is appropriate for a particular codedsymbology scan. As the disk 94 is rotated, the illuminating light isreflected back through the objective lens 92 through each of the opticalpositions 132 and onto the CCD detector 93. In order to minimize thetime it takes to focus the imager 10, only a fraction of the pixels ofthe CCD detector 93 are employed in the determination of the optimumoptical plate, and thereby the focused optical plate.

From start up, the imager 10 produces target illumination, then takesapproximately 25 to 30 milliseconds to reach the rotational speed of 600RPM. The CCD then powers up and then resets. Multiple, up to five,images are taken for photometry, and multiple images are taken forfocusing. Each image requires exposure time and shift out time, which isin the range of, but no greater than 5.5 mS. After the optimum opticalplate is repositioned in the optical path the CCD detector must captureand shift out the entire image in about 31.4 milliseconds. The totaltime for the entire operation is therefore less than half a second,which is sufficient to minimize the variable factors discussedpreviously.

The aforementioned variations are more detrimental to photometry than tofocus analysis. In order to minimize the variations, the presentinvention employs a number of techniques to accelerate the operation.First, the imager operates in a “fast mode.” A small size slice of animage, 384 by 10, is utilized, 384 being over 60% of the image width,and 10 scan lines is more than two times the minimum cell sizerequirement (4 pixels). This ensures than a transition will beencountered in the image slice, while having as small a size a feasible.The search for the proper exposure time uses seven images, but the useof only five images is contemplated, which will require no more than 30mS. The optical disk 94 can be separated into two groups of opticalpositions 132, for Dark field and Bright Field images.

The maximum time to decode a printed label is 350 milliseconds, whilethe maximum time to decode a direct product marked code is 400milliseconds. The foregoing times include the time, from the trigger isactivated, to illuminate, focus, acquire the image, decode thesymbology, and output the decoded data.

If all 325,546 pixels of the CCD detector 93 were used for each opticalplate 132 of the focusing disk 94, the image capture procedure wouldtake far too long. To minimize the time required to obtain data for eachoptical plate 132, only a portion of the CCD detector 93 is used. Inoperation, the CCD detector 93 generates image data as 494 lines, oneline at a time, each line being 659 pixels long. The first 246 lines,instead of being digitized which would require significant time, are“dumped.” Furthermore, to accelerate the process, the speed at which thedata is sent through the CCD is much faster than the speed used fornormal image capture. Since the information contained in the first 246lines is not important to the focusing steps, the degradation of suchinformation, due to the accelerated reception, is not a detriment.

The next ten lines, lines 247-256 are utilized in the analysis describedbelow, and then the CCD detector 93 is reset, never reading lines257-494. In this manner, the focusing time is more than halved.

Referring to FIG. 15, a block diagram of the imager 10 of the presentinvention is illustrated. The CPU 200 connects to the flash memory 202and DRAM 204, which together form the computing engine for the imager10. The CPU 200 further connects to the serial interfaces 206, which inturn is connected to the power supply 210. A microcontroller 212 isconnected by serial link to the CPU 200, and in turn is connected to thepower supply 210, switches 214, motor 216 and illumination drivers 218.The Illumination drivers 218 are connected to the Bright Field and DarkField and Targeting Illumination, shown as Illumination 224 in FIG. 15.An FPGA 220 is connected to the CPU 200, the flash memory 202, DRAM 204,illumination drivers 218 and CCD 222. The FPGA 220 controls the CCD andthe Illumination 224. The FPGA 220 and microcontroller 212 control thetargeting. The Motor 216 drives the focusing disk 94.

In order to evaluate the image data for each optical plate 132, the tenmiddle lines of data need to be analyzed. The transitions between lightand dark areas of the code are critical for such analysis. Furthermore,it is important to note that in the determination of which optical plateprovides the best focus and illumination, the quality of the imagesrelative to one another is what is important, not the absolute imagequality. The imager 10 is designed to achieve correct decoding of thecoded symbology targeted with the minimum necessary focusing, notperfect focusing which would require considerably more time and/orcomplexity.

As an example we will traverse a scan line from left to right. For theexamples in FIGS. 7-14 we used a minimum peak to peak value of 12. Thismeans that a relative white pixel must be greater than a relative blackpixel by a magnitude of 12 for it to be considered a white pixelrelative to that black pixel, but other values may be used depending onthe application. We will first look for a local minimum. We choose a newminimum when the current pixel is less than the previous minimum. Westop looking for a minimum and start looking for a maximum when we finda pixel with a value greater than or equal to the minimum pixel plus 12.We then continue looking for a maximum until we find a pixel that isless than or equal to the current maximum minus 12. When this occurs wehave a local minimum, a local maximum, the magnitude of the differenceand the number of pixels between the minimum and maximum points. Themagnitude of the difference or peak to peak value is used as the indexto the bin number of the edge histogram that should be incremented byone. The number of pixels between the peaks is used as the index to thebin number of the frequency histogram that should be incremented by one.This sequence is repeated for the remainder of the scan line.

Referring to FIG. 7a, point A is the first local maxima. Point B is thefirst local minima. Point C is an inflection recognition point, meaningyou know you are done looking for a local minima because you are morethan 12 above the value at point B. You can then evaluate the pair AB.For the pair AB, the frequency corresponds to |X(A)−X(B), while the peakto peak value corresponds to |Y(A)-Y(B). Point D is not a local minimabecause it is not at least 12 less than point C1, an inflection pointbetween points B and D. Point E is the second local maxima, pont F isthe inflection recognition point for the pair BE. Point G is the secondlocal minima and point H is the third inflection recognition pointcorresponding to the pair EG. Point I is the third local maxima.

For illustrative purposes, FIG. 7 shows a pixel plot of line 235 of theCCD for the values between 128 and 508, in the horizontal location, forimages p1, p6, and p1, shown in FIGS. 6a, 6 f and 6 k. The three imagesare shown by three different lines, p1 is shown by the solid line, imagep6 is shown by the dashed line, and image p1 is shown by the dottedline.

The data from which the pixel plots of FIG. 7 are drawn is shown inTable A, shown in FIGS. 8a-8, and includes the values for eachhorizontal location within the field. From FIG. 7, it can be clearlyseen that the image p6 has the best transitions.

Illumination analysis is performed by developing entropy scores for eachilluminating condition. The quality or nature of the transitions(peak-to-peak) values are taken into account by this analysis. In anedge histogram the y axis is the population or number of transitions,and the x axis represents the peak-to-peak value.

FIGS. 6a-6 k represent eleven images p1-p11. Images p1-p6, shown inFIGS. 6a-6 f, are used in the following photonics or photometricanalysis, and images p6-p11, shown in FIGS. 6f-6 k, are used in thefollowing focus analysis.

Referring to FIG. 9, an edge histogram is illustrated for images p1-p6,shown in FIGS. 6a-6 f. FIGS. 10a-10 g show Table B which contains thepopulation for each peak-to-peak value of each image p1-p6. The imagesp1-p6 are illustrated by different shaded areas in FIG. 9. Thepeak-to-peak values begin at 12, since, as shown in FIG. 10a, the firstpopulation value does not occur until 12 for image p1. Similarly, FIG. 9ends with value 118 for image p6. The remaining values up to 255 are allzeros in the example shown in FIG. 9, and therefore are not illustrated.The entropy score, maximum pixel value and minimum pixel value for eachimage p1-p6 are shown in FIG. 11, with the entropy score being the totalof the population values for each image. The entropy values individuallyhave no meaning. Rather, a comparison of the entropy values with oneanother shows which image has the highest entropy value. Here it isimage p6 with a value of 758. With reference to FIG. 9, it is clear thatimage p6 has the largest area under its curve, which is represented bythe entropy value. From the forgoing, it can be seen that image p6 hasthe best illumination.

The maximum and minimum pixel values are obtained from the average ofthe brightest 20 and the average of the dimmest 20 values, respectively.These maximum and minimum pixel values can be used to determine if theimage meets minimum criteria for usability.

The entropy score is not used by itself, and in particular when an imageis over-saturated. In that instance, the signal has reduced thepeak-to-peak values, and has fewer edges than an under-saturated image.

To perform the optical plate focus analysis the microprocessor concernsitself with the rate of change of energy between neighboring pixels ofimage data. If all transitions are plotted in a two dimensionalhistogram, a graph can be generated to produce a score for determiningthe optimum focus. The x axis represents the number of pixels betweenlocal maxima and minima, and the y axis represents the population.

FIGS. 12a-12 b are frequency histograms for images p6-p11, shown inFIGS. 6f-6 k. The number of pixels between peaks are plotted on thex-axis in a range of 1 to 123. 123 is the highest value having apopulation, for image p6, as shown in Table C in FIGS. 13a-13 e, whichprovides the population values for the number of pixels between peaks.Reviewing FIG. 12a, it can be clearly seen that most of the data appearsin the first values on the x-axis, and therefore these values are shownin the enlarged portion of the histogram shown in FIG. 12b.

A focused image has a sharp contrast between light and dark areas. Anout of focus condition is represented by the loss of high frequencycomponents. Therefore, the image with the highest population density athigh frequency indicates the best focus. The data represented in FIGS.12a and 12 b is shown in Table C of FIGS. 13a-13 g. Unlike illumination,the determination of the optimum focus does not use the entirepopulation. Rather, only the first seven values are used to develop theentropy scores, shown in FIG. 14. Since slow edges are represented bylow frequency values, only the first seven values are needed. Accordingto FIG. 14, image p6 has the highest entropy score of 894, indicatingthat it is the best focused image.

During image capture and decoding operations, the imager 10 drawsapproximately 200-500 milliamperes of constant power at 4.2-5.25 V.Where the imager 10 interfaces with a portable data terminal (PDT), 4 to6 V is normally specified at 200-500 mA, while the universal serial bus(USB) interface is specified at 4.2 to 5.25 volts at 100-500 mA.

FIGS. 16 through 21 illustrate the method of quickly determining theproper focus and illumination values in DMP applications.

FIGS. 16-18 illustrate the situation when the DMP is on a dark reflectedsurface and FIGS. 19-21 illustrate the situation when the DMP is on ashiny reflected surface.

Multiple sets of illuminating parameters are predefined based upon DMPapplications with the reflected ranges from very dark to very shinysurfaces. The primary difference between these sets of illuminating andfocusing parameters is the gain. FIG. 16 illustrates a situation when ahigh gain is applied to a dark reflected surface. FIG. 17 shows thesituation when a relatively average gain is used on a dark reflectedsurface, and FIG. 18 shows the use of low gain on a dark reflectedsurface.

When the focusing disk 94 goes through three wheel revolutions, eachrevolution is associated with one set of the illuminating parameters.Therefore, dependent upon the number of images taken with each wheelrevolution, various output are provided. For example, when 12 images areused for each wheel revolution, a total of 36 readings would be utilizedto determine the proper focus and illumination. Each set of the 12images would go through the focus analysis which is based upon thehighest population density at the high frequency area (sum of the edgesmagnitude) to find its own best focus position. Within these three bestfocused entropy scores (one for each revolution) the one with thehighest signal to noise ratio is the highest score set. This wouldtherefore be the best of the illuminating parameters associated with thebest focused position.

FIGS. 19-21 show a second set of illuminating parameters used on a shinyreflected surface with either a high gain (FIG. 19), a middle gain (FIG.20) or a low gain (FIG. 21) applied thereto. Since the original signalis clipped with the utilization of the high gain and the middle gain, itis clear that the low gain shown in FIG. 1 would have a better dynamicrange and would therefore be used to properly focus the image orprovided for the best illumination.

As described hereinabove, the present invention of determining theoptimum focus and illumination utilizes the three parameters ofintensity, exposure time and gain. During each revolution of thefocusing disk 94, the intensity and the exposure time remain constant,but the gain would be changed for each of the revolutions. It should beappreciated that the present invention could also be practicalregardless of the choice of the variable parameter. For example, theintensity can be varied with the gain and the exposure time remainingconstant, or the exposure time varies from revolution to revolution withgain and the intensity remaining fixed.

A second embodiment employs only two sets of illuminating parameters foreach of the optical positions of the rotating focusing disk 94. In thisembodiment, only two revolutions of the focusing disk will be required,thereby shortening the time it would take to determine the properillumination level as well as the best focus. In this instance, a middlegain level would be used for the first revolution with the exposure timeand intensity remaining fixed. Based upon the sensed values at each ofthe positions of the rotating focus disk, a determination is madewhether a low gain or high gain should be used for the second revolutionof the rotating focus disk. Once this determination is made, either thelow gain or high gain is applied during the second revolution. Thesensed values of both rotations are used to produce an entropy value foreach of the positions. These entropy values are compared to one anotherto determine the correct illumination value as well as the correct focusvalue.

Similarly, the gain and the intensity could remain constant during bothrevolutions with the exposure time being varied from the firstrevolution to the second revolution. Furthermore, the exposure time andthe gain can remain constant for both revolutions and the intensitycould be varied from the first revolution to the second revolution. Thesensed value for both revolutions are used to produce the entropy value.These entropy values are compared to one another to determine thecorrect illumination value as well as the correct focus value.

Having described the preferred embodiments of the hand-held imager inaccordance with the present invention, it is believed that othermodifications, variations and changes will be suggested to those skilledin the art in view of the description set forth above, such as utilizingdifferent focusing disk configurations, or other focusing configurationssuch as quintic lens. It is therefore to be understood that all suchvariations, modifications and changes are believed to fall within thescope of the invention as defined in the appended claims.

What is claimed is:
 1. A method of focusing an optical symbologyutilizing a set of illumination parameters including intensity, exposuretime and gain comprising the steps of: capturing an image of saidoptical symbology in an active area of a two dimensional photodetector;providing at least two focusing zones of said optical symbology,controlling said two dimensional photodetector to receive said image ofsaid optical symbology for each of said ay least two focusing zones insaid active area with a first level of one of the parameters; saidactive area of said two dimensional photo-detector shifting out saidimage data substantially serially, first evaluating transitions betweenlight and dark data in a central set of scan lines, producing arepresentative value for each of said at least two focusing zones, anddetermining a first relative focus value based upon a largest of saidrepresentative values; controlling said two dimensional photodetector toreceive said image of said optical symbology for each of said at leasttwo focusing zones in said active area with a second level unequal tosaid first level of said one of the parameters; said active area of saidtwo dimensional photodetector shifting out said image data substantiallyserially; evaluating transitions between light and dark data in acentral set of scan lines producing a representative value for each ofsaid at least two focusing zones and determining a second relative focusvalue based upon a largest of said representative values; comparing saidfirst and second relative focus values to determine an optimum focus;and wherein at least two levels of one of the parameters is used tofocus the optical symbology.
 2. The method of focusing in accordancewith claim 1, further including the steps of: controlling said twodimensional photodetector to receive said image of said opticalsymbology for each of said at least two focusing zones in said activearea with a third level of said one of the parameters, unequal to saidfirst level and said second level; said active area of said twodimensional photodetector shifting out said image data substantiallyserially; evaluating transitions between light and dark data in acentral set of scan lines producing a representative value for each ofsaid at least two focusing zones and determining a third relative focusvalue based upon a largest of said representative values; and comparingsaid first, second and third relative focus values to determine anoptimum focus.
 3. A method of reading an optical symbology as recited inclaim 2, wherein said central set of lines is ten lines.
 4. A method ofreading an optical symbology as recited in claim 2, further comprisingthe step of producing said representative value by adding a first sevento ten values from a complete set of frequency values for each of saidat least two focusing zones.
 5. A method of reading an optical symbologyas recited in claim 2, wherein twelve focusing zones are provide.
 6. Themethod in accordance with claim 1, including the step of reviewing therepresentation value produced by said first evaluating step to determinewhether said second level should be greater or less than said firstlevel.
 7. A method of reading an optical symbology as recited in claim1, wherein said central set of lines is ten lines.
 8. A method ofreading an optical symbology as recited in claim 1, further comprisingthe step of producing said representative value by adding a first sevento ten values from a complete set of frequency values for each of saidat least two focusing zones.
 9. A method of reading an optical symbologyas recited in claim 1, wherein twelve focusing zones are provided. 10.The method in accordance with claim 1, wherein said one of theparameters is gain.
 11. The method in accordance with claim 1, whereinsaid one of the parameters is exposure time.
 12. The method inaccordance with claim 1, wherein said one of the parameters isintensity.
 13. A method of reading an optical symbology utilizing a setof illumination parameters including intensity, exposure time and gaincomprising the steps of: providing multiple illumination conditions ofsaid optical symbology; capturing an image of said optical symbology inan active area of a two dimensional photodetector for each of saidmultiple illumination conditions, first determining a first relativeoptimum illumination by calculating edge totals for each image datareceived by said two dimensional photodetector provided at a first levelof one of the parameters; comparing said edge totals for all of saidmultiple illumination conditions provided at said first level of one ofthe parameters to determine a largest edge total; determining a secondrelative optimum illumination by calculating edge totals for each imagedata received by said two dimensional photodetector provided at a secondlevel unequal to the first level of said one of the parameters;comparing said first relative optimum illumination with said secondrelative optimum illumination with respect to said edge totals;utilizing said largest edge total as an indicator of optimumillumination; and wherein at least two of one of the parameters is usedto read the optical symbology.
 14. The method in accordance with claim13, further including the steps of: determining a third relative optimumillumination by calculating edge totals for each image data received bysaid two dimensional photodetector provided at a third level of said oneof the parameters; and comparing said first, second and third relativeoptimum illumination with respect to said edge totals.
 15. The method inaccordance with claim 13, including the step of reviewing the edgetotals produced by said first determining step to determine whether saidsecond level of said one of the parameters should be greater or lessthan said first level of said one of the parameters.
 16. The method inaccordance with claim 13, wherein said one of the parameters is gain.17. The method in accordance with claim 13, wherein said one of theparameters is exposure time.
 18. The method in accordance with claim 13,wherein said one of the parameters is intensity.